<template>
  <el-date-picker v-bind="datePickerProps" v-on="datePickerEvents">
    <!-- 插槽内容 -->
    <template v-for="(_, slot) in $slots" #[slot]="scope">
      <slot :name="slot" v-bind="scope || {}"></slot>
    </template>
  </el-date-picker>
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue';

export default defineComponent({
  name: 'BDatePicker',
  props: {
    datePickerProps: {
      type: Object as PropType<Record<string, any>>,
      default: () => ({})
    },
    datePickerEvents: {
      type: Object as PropType<Record<string, any>>,
      default: () => ({})
    }
  }
});
</script>
